import axios from 'axios'
export default function ({ isServer, req, redirect, route }) {
  let isMobile = (ua) => {
    return !!ua.match(/AppleWebKit.*Mobile.*/)
  }
  console.log(route.fullPath);
  let userAgent = req ? req.headers['user-agent'] : navigator.userAgent || ''
  return isMobile(userAgent) ? redirect('/Mobile/Business') : redirect('/Business')
  // 使用redirect 重定向到外链需要加上前缀:https / https
}
